package aircraftWar;


import java.awt.image.BufferedImage;

/**
 * 说明：大敌机
 *
 * @author: PYS
 * @date: 2022/11/8
 **/
public class BigAirplane extends FlyingObject implements EnemyScore {

    public BigAirplane() {
        super(66, 89);
    }

    public void step() {
        this.y += this.speed;
    }

    int index = 1;
    public BufferedImage getImage() {
        if (isLive()) {
            return Images.bairs[0];
        } else if (isDead()) {
            BufferedImage img = Images.bairs[index++];
            if (index == Images.bairs.length) {
                state = REMOVE;
            }
            return img;
        }
        return null;
    }

    public int getScore() {
        return 3;
    }
}
